package com.leizi.igym.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leizi.igym.domain.Trainer;
import com.leizi.igym.dto.TrainerPageQueryDTO;
import com.leizi.igym.vo.TrainerVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author PC
 * @description 针对表【t_trainer(教练表)】的数据库操作Mapper
 * @createDate 2024-04-07 08:44:33
 * @Entity com.leizi.igym.domain.Trainer
 */
public interface TrainerMapper extends BaseMapper<Trainer> {

    TrainerVO selectByIdWithExpertise(Long id);

    // 不使用，有bug
    Page<TrainerVO> selectPageWithExpertise(Page<TrainerVO> objectPage,@Param(Constants.WRAPPER) Wrapper<TrainerVO> qw);


    Page<TrainerVO> selectPageWithExpertiseByDTO(Page<TrainerVO> trainerVOPage,
                                                 @Param("dto") TrainerPageQueryDTO dto);

    Page<TrainerVO> testSelectPage(Page<TrainerVO> trainerVOPage, @Param(Constants.WRAPPER) QueryWrapper<Trainer> qw);

    List<TrainerVO> selectAllWithExpertise();
}




